export default class Utils {
    constructor() {
    }

    initWebGLData(lineNumber, pointNumber) {
        let data = [];
        for (let i = 0; i < lineNumber; i++) {
            let data2 = [];
            for (let j = 0; j < pointNumber * 2; j++) {
                if (Math.random() < 0.5) {
                    data2.push((-1) * Math.random());
                } else {
                    data2.push(Math.random());
                }
            }
            data.push(data2);
        }
        return data
    }

    initCanvasData(lineNumber, pointNumber) {
        let canvasData = []
        for (let i = 0; i < lineNumber; i++) {
            let data2 = [];
            for (let j = 0; j < pointNumber * 2; j++) {
                data2.push(Math.random() * canvas.width)
            }
            canvasData.push(data2);
        }
        return canvasData
    }

    initWebGLPointData(pointNumber) {
        let data = [];
        for (let i = 0; i < pointNumber*2; i++) {
            if (Math.random() < 0.5) {
                data.push((-1) * Math.random());
            } else {
                data.push(Math.random());
            }
        }
        return data;
    }

    initCanvasPointData(pointNumber) {
        let data = [];
        for (let i = 0; i < pointNumber*2; i++) {
          data.push(Math.random() * canvas.width)
        }
        return data;
    }

  

}